Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Get innerException message Recursively #630

Merged
merged 10 commits into from
Jul 24, 2020

Conversation

cloud8little
Copy link
Contributor

fix #629

@@ -578,7 +578,7 @@ static string GetExceptionMessage(Exception exception)

if (exception.InnerException != null)
{
return exception.InnerException.Message;
return GetExceptionMessage(exception.InnerException);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Require both changes? or it's enough with the other?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It returns "Exceptions has been thrown by the target of an invocation" if calling current GetExceptionMessage, because Deploy (catch) -> MakeTransaction (throw) -> ApplicationEngine.Run (throw) -> createContract (throw)
b3d93acdeb6f2e17360978c1f3bca78

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can move GetExceptionMessage to ConsoleServiceBase and change

Console.WriteLine($"error: {ex.InnerException.Message}");

shargon
shargon previously approved these changes Jul 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deploy an existed contract only return "engine faulted"
3 participants